home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
F-French
/
(c)f1.d64
/
gourmandise_25
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
3KB
|
93 lines
1 REM A-MAZE-ING
100 DIMRT(3),NT%(16,1,1),JT%(10,1):RT(0)=2:RT(1)=-80:RT(2)=-2:RT(3)=80:LS=40
110 VC=53248:POKEVC+32,6:POKEVC+33,1:PRINTCHR$(147)
120 MC=54272:FORX=MCTO54296:POKEX,0:NEXTX
130 M=((PEEK(53272)AND240)/16)*1024
140 C=55296
200 FORW=0TO1:X=0
210 READY,Z:NT%(X,W,0)=Y:NT%(X,W,1)=Z:X=X+1:IFY<>0THEN210
220 NEXTW:FORW=0TO10:FOR Y=0TO1:READZ:JT%(W,Y)=Z:NEXTY,W
300 PRINT"[147] GOURMANDISE[146]"
305 PRINT" PROMENEZ-VOUS DANS LE LABYRINTHE"
310 PRINT"''POMMIER'' POUR MANGER LES 25 POMMES."
315 PRINT" UTILISER LA MANETTE DANS LE"
320 PRINT" ***CONTROL PORT 1 ***"
325 PRINT" VOUS AVEZ 2 MINUTES POUR LES DEVORER"
330 PRINT" TOUTES, OU PRESSER F1[146] POUR ABANDONNER."
335 PRINT" IL EST POSSIBLE QUE VOUS NE PUISSIEZ"
340 PRINT" ATTEINDRE TOUTES LES POMMES..."
345 PRINT" PESER SUR LE BOUTON FEU[146] POUR COMMENCER"
350 X=0:GOSUB9500
360 GETX$:IF X$=""THEN360
370 GOSUB9000:FORW=1TO25:GOSUB8500:POKEM+X,81:POKEC+X,2:NEXTW
380 GOSUB8500:POKEM+X,86:POKEC+X,4
390 R1=INT(X/LS):C1=X-(R1*LS):TI$="000000":AC=0
400 C2=C1:R2=R1
410 GOSUB8000:IFC1=C2ANDR1=R2THEN410
420 IFC2<0THENC2=0
430 IFC2>39THENC2=39
440 IFR2<0THENR2=0
450 IFR2>24THENR2=24
460 X=PEEK(M+(R2*LS)+C2)
470 IF X<>32ANDX<>81THEN400
480 OD=(R1*LS)+C1:ND=(R2*LS)+C2:IFX=81THEN600
500 POKEM+OD,32:POKEC+OD,1:POKEM+ND,86:POKEC+ND,4
510 C1=C2:R1=R2:GOTO410
600 POKEMC+0,0:POKEMC+1,0:POKEMC+5,15:POKEMC+6,15:POKEMC+4,129:POKEMC+24,5
610 FORY=40TO60STEP5:POKEMC+1,Y:FORW=1TO5:NEXTW,Y
615 POKEMC+4,128:POKEMC+24,0
617 POKEM+ND,86:POKEC+ND,4
620 POKEM+OD,32:POKEC+OD,1
640 C1=C2:R1=R2:AC=AC+1
650 IFAC>24THENGOTO800
660 Y=(PEEK(VC+32)AND15)+1:IFY>15THENY=2
670 POKEVC+32,Y
680 GOTO410
800 POKEVC+32,6:PRINT"[147] GOURMANDISE[146]"
810 PRINT" VOUS AVEZ MANGE";AC;"POMMES."
820 PRINT" VOTRE MOYENNE EST";AC*4;"[157]%":W=INT(TI/60):X=INT(W/60)
830 Y=W-(X*60):X$=STR$(X):Y$=RIGHT$(X$,1)+".":IFY<10THENY=Y+100
840 X$=STR$(Y):Y$=Y$+RIGHT$(X$,2):PRINT" VOTRE TEMPS EST ";Y$
850 X=1:GOSUB9500
860 PRINT"[144] VOUS JOUEZ ENCORE? (OUI[146] /NON[146])"
870 GETX$:IFX$=""THEN870
880 IFX$="O"THEN370
890 IFX$<>"N"THEN870
900 X=0:GOSUB9500:PRINTCHR$(147)
910 END
8000 IFTI$>="000200"ORPEEK(197)=4THEN800
8010 J1=15-(PEEK(56321)AND15)
8020 R2=R2+JT%(J1,0)
8030 C2=C2+JT%(J1,1)
8040 RETURN
8500 X=INT(RND(1)*1000):IFPEEK(M+X)<>32THEN8500
8510 RETURN
9000 POKEMC+0,0:POKEMC+1,0:POKEMC+5,15:POKEMC+6,15:POKEMC+24,5
9005 PRINTCHR$(147);"[144]";:X$=" [146]"
9010 FORX=1TO24:PRINTX$;" [146]";:NEXTX:PRINTX$;:POKEM+999,160:POKEC+999,0
9020 X=M+81:POKEX,4
9030 Y=INT(4*RND(1)):Z=Y:POKEMC+1,INT(RND(1)*10)+10:POKEMC+4,17
9040 W=X+RT(Y):IFPEEK(W)=160THENPOKEW,Y:POKEX+RT(Y)/2,32:X=W:GOTO9030
9045 POKEMC+4,16
9050 Y=Y+1:IFY>3THENY=0
9060 IFY<>ZTHEN9040
9070 Y=PEEK(X):POKEX,32
9080 IF Y<4THENX=X-RT(Y):GOTO9030
9090 POKEMC+24,0:FORX=0TO999:IFPEEK(M+X)<>160THENPOKE(M+X),32
9100 NEXTX:RETURN
9500 POKEMC+0,0:POKEMC+1,0:POKEMC+5,79:POKEMC+6,129:POKEMC+24,15:Y=0
9510 W=INT(NT%(Y,X,0)/256)
9520 POKEMC+0,NT%(Y,X,0)-(W*256)
9530 POKEMC+1,W:POKEMC+4,17
9540 FORW=1TONT%(Y,X,1)*100:NEXTW
9550 POKEMC+4,16:FORW=1TO20:NEXTW
9560 IFNT%(Y,X,0)<>0THENY=Y+1:GOTO9510
9570 POKEMC+24,0
9580 RETURN
10000 DATA6430,2,6430,2,6430,2,4817,2,5407,2,5407,2,4817,4,8101,2
10010 DATA8101,2,7217,2,7217,2,6430,4,0,0
10020 DATA6430,2,6430,2,7217,2,5728,2,6430,1,7217,2,8101,2,8101,2
10030 DATA8583,2,8101,2,7217,1,6430,2,8583,2
10040 DATA6430,2,5728,2,6430,8,0,0
10500 DATA0,0,-1,0,1,0,0,0,0,-1,-1,-1,1,-1,0,0,0,1,-1,1,1,1